import { NavLink } from 'react-router-dom';
import { Button } from 'antd';
import LoginAvatar from './LoginAvatar';

export default function NavHeader(props) {
  return (
    <nav className="container flex items-center mx-auto">
      <div className="logo text-white">
        <NavLink to={'/'}>
          <img className="h-12 cursor-pointer" src="/logo1.png" alt="logo" />
        </NavLink>
      </div>

      <nav className="menus-wrap flex items-center justify-evenly text-white text-lg">
        <NavLink to={'/'}>问答</NavLink>
        <NavLink to={'/books'}>书籍</NavLink>
        <NavLink to={'/interviews'}>修仙</NavLink>
        <NavLink to={'/interviews?t=1'}>修仙传</NavLink>
        {/* <a href="https://www.baidu.com/?tn=57095150_7_oem_dg" target="_blank">
          修仙传
        </a> */}
      </nav>

      <div className="login-wrap ml-auto flex items-center">
        {/* <Button type="primary">登录/注册</Button> */}
        <LoginAvatar loginHandle={props.loginHandle} />
      </div>
    </nav>
  );
}
